package me.zhengjie.pool.ipproxy.domain;


import lombok.Data;
import org.jsoup.select.Elements;

import java.io.Serializable;

/**
 * @Date 创建时间： 2021-01-14 11:56
 * @Author 作者姓名: WuNengDeShiXiong
 * @Version 1.0
 * @Copyright Copyright by
 * @Direction 类说明
 */
@Data
public class IPInfo implements Serializable {

    private String ip ;
    private String port ;
    private String city ;
    private String type ;
    private String validTime ;
    private String source ;

    public IPInfo(){}

    public IPInfo(Elements tdChilds){
        if ( tdChilds != null  && tdChilds.size() > 1 ) {
            this.ip = tdChilds.get(0).text() ;
            this.port = tdChilds.get(1).text() ;
            this.city = "中国" + tdChilds.get(2).text() ;
            this.type = tdChilds.get(3).text() ;
            this.validTime = tdChilds.get(4).text() ;
        }
    }

}
